<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<%  

String path = request.getContextPath();  

String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";  

%>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>Sponsor Home Page</title>
		<!--
        	作者：1107485571@qq.com
        	时间：2018-07-07
        	描述：引用bootstrap样式和js
        	版本说明：bootstrap 3.3.7   jquery3.3.1
        -->
		<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
		<script src="js/jquery-3.3.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>

		<!--
        	作者：1107485571@qq.com
        	时间：2018-07-07
        	描述：引用额外的图标库
        -->
		<link rel="stylesheet" href="css/iconfont.css" />

		<!--
        	作者：1107485571@qq.com
        	时间：2018-07-07
        	描述：主页的css样式
        -->
		<link rel="stylesheet" type="text/css" href="css/index.css" />
		<link rel="stylesheet" type="text/css" href="css/PersonalHomePage.css" />
		<link rel="stylesheet" type="text/css" href="css/header.css"/>
	</head>

	<body>
		<%@ include file="header.jsp" %>

		<script type="text/javascript">
		window.onload = function() {
			var tempdivc = document.getElementById('slider_nav_left');
			var lis = tempdivc.getElementsByTagName('li');
			var show = $('#needselected').children();
			for(var i = 0; i < lis.length; i++) {
				lis[i].onclick = function() {
					for(var j = 0; j < lis.length; j++) {
						if(lis[j] == this) {
							lis[j].className = 'selected';
							show[j].className = 'blocked onetime';
						} else {
							lis[j].className = '';
							show[j].className = 'onetime';
							
						}
					}
				}
			}
				
				
				var mycontesttitle = document.getElementById('mycontesttitle');
				var selectedlis = mycontesttitle.getElementsByTagName('span');
				var mycontestcare = document.getElementById("mycontestcare");
				var mycontestper = document.getElementById("mycontestper");
//				var show = $('#needselected').children();
				for(var i = 0; i < selectedlis.length; i++) {
					selectedlis[i].onclick = function() {
						for(var j = 0; j < selectedlis.length; j++) {
							if(selectedlis[j] == this) {
								selectedlis[j].className = 'selected';
//								show[j].className = 'blocked onetime';
								if(j == 1){
									mycontestcare.className="blocked";
									mycontestper.className="";
								}
								else{
									mycontestper.className="blocked";
									mycontestcare.className="";
								}
							} else {
								selectedlis[j].className = '';
//								show[j].className = 'onetime';
								
							}
						}
					}
				}
			}
		</script>

		<div id="wrapper">
			<div id="main_personal">
				<div id="session_one">
					<img id="head_portrait" src="img/push3.jpg" />
					<div id="" style="float: left;">
						<span id="account_name">
						${sessionScope.loginSponsor.sponsorName} <!--传过来的用户名-->
						
						</span>
						<br />
						<br />
						<span id="account_specialty">
							<span class="glyphicon glyphicon-gift" style="color: #5BC0DE;"></span> 牛客网 - 经营组织
						<!--传过来的大学加专业-->
						</span>
					</div>

				</div>
				<span style="margin: 20px 40px; padding: 10px; display: inline-block; background-color: #FFF4E5;"> 上次访问时间：<span style="color: red;">2017-9-12 22:30:19</span> 登录IP：<span style="color: red;">192.168.0.1</span></span>
				<div id="session_two">
					<ul id="all-access_record">
						<li style="margin-left: 20px;">0<br />
							<a href="#" style="text-decoration: none;">发布</a>
						</li>
						<!--传过来的值 -->
						<li>0<br />
							<a href="#" style="text-decoration: none;">学术</a>
						</li>
						<li>0<br />
							<a href="#" style="text-decoration: none;">访问</a>
						</li>
					</ul>
					<a href="#" class="btn btn-info btn-lg" data-toggle="modal" data-target="#editPersonal" style="margin-left:40px ; margin-top: 20px;">
						<span class="glyphicon glyphicon-pencil"></span> 编辑资料
					</a>
				</div>
			</div>
			<!-- 模态框（Modal） -->
			<div class="modal fade" id="editPersonal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×
				</button>
							<h4 class="modal-title" id="myModalLabel">
					个人信息修改
				</h4>
						</div>
						<div class="tab-pane fade in active" id="home">
							<form name="updateSponsorForm" action="<%=path%>/sponsor/Sponsor_update.action" method="post" class="form-horizontal" role="form">
								<div class="form-group form-group-edit">
									<label for="firstname" class="col-sm-3 control-label">昵称</label>
									<div class="col-sm-9">
										<input required type="text" name="sponsorName" class="form-control" id="firstname" value="${sessionScope.loginSponsor.sponsorName}">
									</div>
								</div>
								<div class="form-group form-group-edit">
									<label for="lastname" class="col-sm-3 control-label">密码</label>
									<div class="col-sm-9">
										<input required type="password" name="sponsorPassword" class="form-control" id="lastname" value="${sessionScope.loginSponsor.sponsorPassword}">
									</div>
								</div>
								<div class="form-group form-group-edit">
									<label for="lastname" class="col-sm-3 control-label">电话</label>
									<div class="col-sm-9">
										<input required type="tel" name="sponsorTel" class="form-control" id="lastname" value="${sessionScope.loginSponsor.sponsorTel}">
									</div>
								</div>
								<div class="form-group form-group-edit">
									<label for="lastname" class="col-sm-3 control-label">邮箱</label>
									<div class="col-sm-9">
										<input required type="email" name="sponsorEmail" class="form-control" id="lastname"  value="${sessionScope.loginSponsor.sponsorEmail}" readonly="readonly"">
									</div>
								</div>
								

							
						</div>
						<div class="modal-footer" style="margin-right: 63px;">
							<button type="button" class="btn btn-default" data-dismiss="modal">关闭
				</button>
							<input type="submit" class="btn btn-primary" value="提交更改">
				
				</form>
						</div>
					</div>
					<!-- /.modal-content -->
				</div>
				<!-- /.modal-dialog -->
			</div>
			<!-- /.modal -->

			<div id="main_content">
				<div id="slider_nav_left">
					<ul>
						<li class="selected"><span class="glyphicon glyphicon-user"></span> &nbsp;信息</li>
						<li> <span class="glyphicon glyphicon-fire"></span> &nbsp;竞赛</li>
						<li><span class="glyphicon glyphicon-heart-empty"></span> &nbsp;收藏</li>
						<li><span class="glyphicon glyphicon-send"></span> &nbsp;活动</li>
						<li><span class="glyphicon glyphicon-book"></span> &nbsp;文章</li>
						<li>其他</li>
						<li>其他</li>
					</ul>
				</div>
				<div id="slider_nav_right">
					<ul id="needselected">
						<li  class="blocked onetime">
							<div id="person_information">
								<h4>${sessionScope.loginSponsor.sponsorName}的组织信息</h4>
								<!--通过session传值-->
								<hr />
								<ul>
									<li><span class="btn-info btn-lg">昵称</span><div>${sessionScope.loginSponsor.sponsorName}</div></li>
									<hr />
									<!--通过session传值-->
									<li><span class="btn-info btn-lg">密码</span><div>********</div> </li>
									<hr />
									<li><span class="btn-info btn-lg">电话</span><div>${sessionScope.loginSponsor.sponsorTel}</div> </li>
									<hr />
									<li><span class="btn-info btn-lg">邮箱</span><div>${sessionScope.loginSponsor.sponsorEmail}</div> </li>
									<hr />
								</ul>
							</div>
						</li>
						<li class="onetime" id="mycontest">
							<div id="mycontesttitle">
								<span class="selected">
									已发布的竞赛
								</span>（3）
								<span id="">
									待审核的竞赛
								</span>（3）
							</div>
							
							<hr />
							<div id="mycontestper" class="blocked">
								<ul>
									<li class="inner_content">
										
										<p>名称</p>
										<ul class="left">
											<li>级别：</li><br />
											<li>报名时间：</li><br />
											<li>比赛时间：</li><br />
										</ul>
										<ul class="right">
											<li class="btn-info btn-lg">已经发布</li>
											<li><a href="#">竞赛详情>></a></li>
										</ul>
										
									</li>
									<hr />
									<li class="inner_content">
										
										<p>名称</p>
										<ul class="left">
											<li>级别：</li><br />
											<li>报名时间：</li><br />
											<li>比赛时间：</li><br />
										</ul>
										<ul class="right">
											<li class="btn-info btn-lg">已经发布</li>
											<li><a href="#">竞赛详情>></a></li>
										</ul>
										
									</li>
									<hr />
									<li class="inner_content">
										
										<p>名称</p>
										<ul class="left">
											<li>级别：</li><br />
											<li>报名时间：</li><br />
											<li>比赛时间：</li><br />
										</ul>
										<ul class="right">
											<li class="btn-info btn-lg">已经发布</li>
											<li><a href="#">竞赛详情>></a></li>
										</ul>
										
									</li>
									<hr />
								</ul>
							</div>
							<div id="mycontestcare">
								<ul>
									
									<li class="inner_content">
										
										<p>名称</p>
										<ul class="left">
											<li>级别：</li><br />
											<li>报名时间：</li><br />
											<li>比赛时间：</li><br />
										</ul>
										<ul class="right">
											<li class="btn-info btn-lg">正在审核</li>
											<li><a href="#">竞赛详情>></a></li>
										</ul>
										
									</li>
									<hr />
									<li class="inner_content">
										
										<p>名称</p>
										<ul class="left">
											<li>级别：</li><br />
											<li>报名时间：</li><br />
											<li>比赛时间：</li><br />
										</ul>
										<ul class="right">
											<li class="btn-info btn-lg">正在审核</li>
											<li><a href="#">竞赛详情>></a></li>
										</ul>
										
									</li>
									<hr />
									<li class="inner_content">
										
										<p>名称</p>
										<ul class="left">
											<li>级别：</li><br />
											<li>报名时间：</li><br />
											<li>比赛时间：</li><br />
										</ul>
										<ul class="right">
											<li class="btn-info btn-lg">正在审核</li>
											<li><a href="#">竞赛详情>></a></li>
										</ul>
										
									</li>
									<hr />
									
								</ul>
							</div>
						</li>
						<li class="onetime" >

						</li>
						<li class="onetime" >

						</li>
						<li class="onetime" >

						</li>
						<li class="onetime" >

						</li>
					</ul>

				</div>
			</div>
		</div>
	</body>

</html>